package entity

import (
	"time"
	"fmt"
)

type Depart struct {
	Name string
}


type Userinfo struct {
	Uid int `orm:"pk"`//使用beego orm，如果表的主键不是id，那么需要加上pk注释，显式的说这个字段是主键
	Username string
	Departname string
	Created time.Time
}

func (u *Userinfo)FormatUserPrint()  {
	fmt.Println("用户ID ",u.Uid)
	fmt.Println("用户名 ",u.Username)
	fmt.Println("所属部门 ",u.Departname)
	fmt.Println("时间 ",u.Created)
}

type Server struct {
	ServerName string
	ServerIP string
}

func (ser Server)ServerString()  {
	fmt.Printf("serverName=%s,serverIP=%s",ser.ServerName,ser.ServerIP)
	fmt.Println()

}

type Servers struct {
	Servers []Server
}